package com.ruoyi.accountant.domain.other;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@AllArgsConstructor
@NoArgsConstructor
@Data
public class CallResult {
    private String message;
    private boolean ok;

    public static CallResult ok() {
        return new CallResult("OK", true);
    }

    public static CallResult error() {
        return new CallResult("ERROR", false);
    }

    public static CallResult error(String message) {
        return new CallResult(message, false);
    }
}
